package com.jackeys.piaems;

import com.jackeys.piaems.dao.ImageDao;
import com.jackeys.piaems.intrusionDetection.ImageServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class PiaemsApplication implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(PiaemsApplication.class, args);

    }

    @Autowired
    private ImageDao imageDao;

    @Override
    public void run(String... args) throws Exception {
        new Thread(new ImageServer(imageDao));
    }
}
